Skip to content

feat: RMK v0.9 support and layout convert/show subcommands - #12

Closed
HaoboGu wants to merge 5 commits into
masterfrom
feat/rmk-0.9-final
Closed

feat: RMK v0.9 support and layout convert/show subcommands#12
HaoboGu wants to merge 5 commits into
masterfrom
feat/rmk-0.9-final

Conversation

@HaoboGu

@HaoboGu HaoboGu commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Consolidates the v0.9 adaptation and the KLE layout tooling into one branch (supersedes chore/rmk-0.9-compat, feat/layout_converter, and feat/rmk-v0.9).

RMK v0.9 adaptation

  • Migrate to rmk-config's resolved::* API (identity() / hardware() / host()); the old getter API was removed upstream
  • Drop the removed controller feature push; vial_lock is now host_lock
  • Support the Rynk protocol: rynk_enabled enables the rynk feature and disables the mutually-exclusive vial
  • Update the bundled sample keyboard.toml to the v0.9 schema

New: rmkit layout

  • rmkit layout convert <kle|vial.json> [-o FILE] — KLE JSON export or vial.json → [layout] TOML, validated by a round-trip through RMK's own layout builder; --to-vial for the reverse direction
  • rmkit layout show <keyboard.toml|vial.json|kle> — render the physical layout as box-drawing art in the terminal (shared borders merge into junctions, encoders drawn with rounded corners, --variant to pick one)
  • Conversion engine is the rynk-kle crate from the RMK repo; this CLI is glue over it
  • CLI integration tests with golden fixtures (corne, BAlice65, ANSI 60, raw KLE exports)

Misc

  • Add esp32h2 to the init chip options (templates exist in rmk-template)
  • Template downloads now point at the rmk-rs org
  • README: document the layout commands, switch install links to releases/latest
  • Bump to 0.1.0

Release blocker

rmk-config and rynk-kle are git-pinned to the v0.9.0 prep commit (9372651). Before publishing rmkit 0.1.0, publish rmk-config 0.7 / rynk / rynk-kle to crates.io and switch the two dependencies back to crates.io versions (TODO comment in Cargo.toml).

HaoboGu and others added 5 commits July 3, 2026 18:54
Signed-off-by: Haobo Gu <haobogu@outlook.com>
rmk-config 0.7 removed the `get_*` accessors rmkit was built on and
restructured `keyboard.toml`, so master neither compiles against it nor
parses a 0.9 config. Port the parser to the resolved views — `identity()`,
`hardware()` and `host()` replace the seven `get_*` calls — and fix the
feature list rmkit emits:

- `controller` was removed from rmk, so stop enabling it for light pins
- `vial_lock` is now `host_lock`
- Rynk was not handled at all, so a `rynk_enabled = true` config produced
  a Vial build whose features contradict `[host]` and fail to compile.
  Emit `rynk` and drop `vial` instead.

Migrate the demo `keyboard.toml` to the new schema, and fix two older
breakages in it along the way: the split matrix still used
`input_pins`/`output_pins` (renamed before 0.8), and `chip = "rp2040"`
was paired with nRF pins and BLE.

Point the template download, the version-mapping URL and the README at
the rmk-rs organisation, and use `releases/latest` for the installer
scripts so they stop going stale.

rmk-config 0.7.0 is not on crates.io yet, so the dependency is a git rev
for now. It has to go back to `version = "0.7"` before 0.0.22 is
published — a git dependency cannot be published.

Signed-off-by: Haobo Gu <haobogu@outlook.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…/rmk-0.9-final

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	README.md
#	src/keyboard_toml.rs
… bump 0.1.0

Consolidates chore/rmk-0.9-compat and feat/layout_converter:
- layout_cmd/render: Generated.{inner_layout_toml,display_toml} merged into
  layout_toml upstream; keyboard_toml_to_vial moved to the crate root;
  Key gained rect (center + size); encoders are fixed 1u knobs now
- rynk-kle/rmk-config both git-pinned to the v0.9.0 prep commit (9372651)
  until published on crates.io
- regenerate golden fixtures: the converter now emits [r=deg@(x,y)] rotation
  regions instead of per-key rotated shapes; @2uv is @2u_tall
- add esp32h2 to init chip options (templates exist in rmk-template)
- bump to 0.1.0 for the new layout subcommands
@HaoboGu

HaoboGu commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator Author

Split into a reviewable stack — closing this in favour of:

Same final tree as this branch, verified identical.

@HaoboGu HaoboGu closed this Aug 15, 2026
@HaoboGu
HaoboGu deleted the feat/rmk-0.9-final branch August 15, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant